package br.ucb.visao;

import java.util.List;

import javax.swing.JOptionPane;

public class Visao {

	public static boolean yes_no(String msg, String title) {
		return JOptionPane.showConfirmDialog(null,msg, title, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == 0?true:false;
	}
	public static void showMessage(String msg, String title){
        JOptionPane.showMessageDialog(null,msg, title, JOptionPane.INFORMATION_MESSAGE);
    }
	public static void showListMensager(List<String> erros,String title) {
		String msg = "";
		for (String string : erros) {
			msg = msg+"\n"+string;
		}
		JOptionPane.showMessageDialog(null,msg, title, JOptionPane.ERROR_MESSAGE);
	}


}
